home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 73 64 | 63 63 31 32 2e 75 63 73 |Path: sd|cc12.ucs|
|00000010| 64 2e 65 64 75 21 67 6f | 6c 67 69 21 6a 73 74 72 |d.edu!go|lgi!jstr|
|00000020| 6f 75 74 0a 46 72 6f 6d | 3a 20 4a 6f 73 65 70 68 |out.From|: Joseph|
|00000030| 20 53 74 72 6f 75 74 20 | 3c 6a 73 74 72 6f 75 74 | Strout |<jstrout|
|00000040| 40 75 63 73 64 2e 65 64 | 75 3e 0a 4e 65 77 73 67 |@ucsd.ed|u>.Newsg|
|00000050| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 6c 61 6e 67 |roups: c|omp.lang|
|00000060| 2e 63 2b 2b 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |.c++.Sub|ject: Re|
|00000070| 3a 20 48 45 4c 50 21 20 | 48 6f 77 20 64 6f 20 49 |: HELP! |How do I|
|00000080| 20 77 72 69 74 65 20 74 | 6f 20 61 20 66 69 6c 65 | write t|o a file|
|00000090| 20 75 73 69 6e 67 20 53 | 79 6d 61 6e 74 65 63 20 | using S|ymantec |
|000000a0| 43 2b 2b 3f 0a 44 61 74 | 65 3a 20 4d 6f 6e 2c 20 |C++?.Dat|e: Mon, |
|000000b0| 32 32 20 4a 61 6e 20 31 | 39 39 36 20 30 38 3a 32 |22 Jan 1|996 08:2|
|000000c0| 35 3a 30 32 20 2d 30 38 | 30 30 0a 4f 72 67 61 6e |5:02 -08|00.Organ|
|000000d0| 69 7a 61 74 69 6f 6e 3a | 20 55 6e 69 76 65 72 73 |ization:| Univers|
|000000e0| 69 74 79 20 6f 66 20 43 | 61 6c 69 66 6f 72 6e 69 |ity of C|aliforni|
|000000f0| 61 2c 20 53 61 6e 20 44 | 69 65 67 6f 0a 4d 65 73 |a, San D|iego.Mes|
|00000100| 73 61 67 65 2d 49 44 3a | 20 3c 50 69 6e 65 2e 53 |sage-ID:| <Pine.S|
|00000110| 47 49 2e 33 2e 39 31 2e | 39 36 30 31 32 32 30 38 |GI.3.91.|96012208|
|00000120| 30 32 32 31 2e 32 33 34 | 34 39 43 2d 31 30 30 30 |0221.234|49C-1000|
|00000130| 30 30 40 67 6f 6c 67 69 | 3e 0a 4e 4e 54 50 2d 50 |00@golgi|>.NNTP-P|
|00000140| 6f 73 74 69 6e 67 2d 48 | 6f 73 74 3a 20 67 6f 6c |osting-H|ost: gol|
|00000150| 67 69 2e 75 63 73 64 2e | 65 64 75 0a 4d 69 6d 65 |gi.ucsd.|edu.Mime|
|00000160| 2d 56 65 72 73 69 6f 6e | 3a 20 31 2e 30 0a 43 6f |-Version|: 1.0.Co|
|00000170| 6e 74 65 6e 74 2d 54 79 | 70 65 3a 20 54 45 58 54 |ntent-Ty|pe: TEXT|
|00000180| 2f 50 4c 41 49 4e 3b 20 | 63 68 61 72 73 65 74 3d |/PLAIN; |charset=|
|00000190| 55 53 2d 41 53 43 49 49 | 0a 58 2d 53 65 6e 64 65 |US-ASCII|.X-Sende|
|000001a0| 72 3a 20 6a 73 74 72 6f | 75 74 40 67 6f 6c 67 69 |r: jstro|ut@golgi|
|000001b0| 0a 49 6e 2d 52 65 70 6c | 79 2d 54 6f 3a 20 3c 34 |.In-Repl|y-To: <4|
|000001c0| 64 73 68 68 64 24 67 61 | 6c 40 73 75 6e 64 6f 67 |dshhd$ga|l@sundog|
|000001d0| 2e 74 69 61 63 2e 6e 65 | 74 3e 20 0a 0a 4f 6e 20 |.tiac.ne|t> ..On |
|000001e0| 53 75 6e 2c 20 32 31 20 | 4a 61 6e 20 31 39 39 36 |Sun, 21 |Jan 1996|
|000001f0| 2c 20 72 61 6a 6d 20 77 | 72 6f 74 65 3a 0a 0a 3e |, rajm w|rote:..>|
|00000200| 20 48 69 2c 20 49 20 61 | 6d 20 61 20 62 65 67 69 | Hi, I a|m a begi|
|00000210| 6e 65 72 20 61 74 20 63 | 2b 2b 2c 20 61 6e 64 20 |ner at c|++, and |
|00000220| 49 20 72 65 61 6c 6c 79 | 20 6e 65 65 64 20 73 6f |I really| need so|
|00000230| 6d 65 20 68 65 6c 70 2e | 0a 3e 20 54 68 69 73 20 |me help.|.> This |
|00000240| 69 73 20 61 20 73 69 6c | 6c 79 20 71 75 65 73 74 |is a sil|ly quest|
|00000250| 69 6f 6e 2c 20 62 75 74 | 20 49 20 63 61 6e 27 74 |ion, but| I can't|
|00000260| 20 66 69 6e 64 20 69 74 | 20 69 6e 20 61 6e 79 20 | find it| in any |
|00000270| 62 6f 6f 6b 2e 0a 0a 49 | 20 77 6f 75 6c 64 20 74 |book...I| would t|
|00000280| 68 69 6e 6b 20 74 68 69 | 73 20 77 6f 75 6c 64 20 |hink thi|s would |
|00000290| 62 65 20 63 6f 76 65 72 | 65 64 20 69 6e 20 61 6e |be cover|ed in an|
|000002a0| 79 20 62 61 73 69 63 20 | 43 2b 2b 20 62 6f 6f 6b |y basic |C++ book|
|000002b0| 2c 20 62 75 74 20 68 65 | 72 65 20 0a 67 6f 65 73 |, but he|re .goes|
|000002c0| 2e 2e 2e 20 0a 0a 3e 20 | 49 20 61 6d 20 74 72 79 |... ..> |I am try|
|000002d0| 69 6e 67 20 74 6f 20 63 | 72 65 61 74 65 20 61 20 |ing to c|reate a |
|000002e0| 6e 65 77 20 66 69 6c 65 | 2c 20 61 6e 64 20 77 72 |new file|, and wr|
|000002f0| 69 74 65 20 73 6f 6d 65 | 20 64 61 74 61 20 74 6f |ite some| data to|
|00000300| 20 69 74 2c 20 6c 69 6e | 65 20 62 79 0a 3e 20 6c | it, lin|e by.> l|
|00000310| 69 6e 65 2c 20 61 73 20 | 74 68 65 20 63 6f 6d 70 |ine, as |the comp|
|00000320| 75 74 65 72 20 61 73 6b | 73 20 71 75 65 73 74 69 |uter ask|s questi|
|00000330| 6f 6e 73 20 6f 66 20 74 | 68 65 20 75 73 65 72 2c |ons of t|he user,|
|00000340| 20 6c 69 6b 65 20 22 77 | 68 61 74 20 69 73 20 79 | like "w|hat is y|
|00000350| 6f 75 72 0a 3e 20 6e 61 | 6d 65 3f 22 2c 20 65 74 |our.> na|me?", et|
|00000360| 63 2e 20 49 20 64 6f 20 | 6e 6f 74 20 77 61 6e 74 |c. I do |not want|
|00000370| 20 74 6f 20 75 73 65 20 | 61 20 64 69 61 6c 6f 67 | to use |a dialog|
|00000380| 20 62 6f 78 20 6f 72 20 | 61 6e 79 74 68 69 6e 67 | box or |anything|
|00000390| 20 6c 69 6b 65 20 74 68 | 61 74 2e 0a 0a 48 65 72 | like th|at...Her|
|000003a0| 65 20 69 74 20 69 73 3a | 0a 0a 23 69 6e 63 6c 75 |e it is:|..#inclu|
|000003b0| 64 65 20 3c 69 6f 73 74 | 72 65 61 6d 2e 68 3e 09 |de <iost|ream.h>.|
|000003c0| 09 2f 2f 20 62 61 73 69 | 63 20 69 6e 70 75 74 2f |.// basi|c input/|
|000003d0| 6f 75 74 70 75 74 0a 23 | 69 6e 63 6c 75 64 65 20 |output.#|include |
|000003e0| 3c 66 73 74 72 65 61 6d | 2e 68 3e 09 09 2f 2f 20 |<fstream|.h>..// |
|000003f0| 66 69 6c 65 20 49 2f 4f | 0a 6d 61 69 6e 20 28 29 |file I/O|.main ()|
|00000400| 0a 7b 0a 09 6f 66 73 74 | 72 65 61 6d 20 6d 79 66 |.{..ofst|ream myf|
|00000410| 69 6c 65 28 22 74 68 65 | 41 6e 73 77 65 72 73 2e |ile("the|Answers.|
|00000420| 74 78 74 22 29 3b 09 2f | 2f 20 63 72 65 61 74 65 |txt");./|/ create|
|00000430| 20 6f 75 74 70 75 74 20 | 66 69 6c 65 0a 09 63 68 | output |file..ch|
|00000440| 61 72 20 61 6e 73 77 65 | 72 5b 38 30 5d 3b 09 2f |ar answe|r[80];./|
|00000450| 2f 20 63 68 61 72 61 63 | 74 65 72 20 61 72 72 61 |/ charac|ter arra|
|00000460| 79 0a 0a 09 63 6f 75 74 | 20 3c 3c 20 22 57 68 61 |y...cout| << "Wha|
|00000470| 74 20 69 73 20 79 6f 75 | 72 20 6e 61 6d 65 3f 20 |t is you|r name? |
|00000480| 22 3b 0a 09 63 69 6e 20 | 3e 3e 20 61 6e 73 77 65 |";..cin |>> answe|
|00000490| 72 3b 0a 09 6d 79 66 69 | 6c 65 20 3c 3c 20 61 6e |r;..myfi|le << an|
|000004a0| 73 77 65 72 20 3c 3c 20 | 65 6e 64 6c 3b 0a 0a 09 |swer << |endl;...|
|000004b0| 63 6f 75 74 20 3c 3c 20 | 22 57 68 61 74 20 69 73 |cout << |"What is|
|000004c0| 20 79 6f 75 72 20 71 75 | 65 73 74 3f 20 22 3b 0a | your qu|est? ";.|
|000004d0| 09 63 69 6e 20 3e 3e 20 | 61 6e 73 77 65 72 3b 0a |.cin >> |answer;.|
|000004e0| 09 6d 79 66 69 6c 65 20 | 3c 3c 20 61 6e 73 77 65 |.myfile |<< answe|
|000004f0| 72 20 3c 3c 20 65 6e 64 | 6c 3b 0a 0a 09 63 6f 75 |r << end|l;...cou|
|00000500| 74 20 3c 3c 20 22 57 68 | 61 74 20 69 73 20 74 68 |t << "Wh|at is th|
|00000510| 65 20 61 69 72 73 70 65 | 65 64 20 76 65 6c 6f 63 |e airspe|ed veloc|
|00000520| 69 74 79 20 6f 66 20 61 | 6e 20 75 6e 6c 61 64 65 |ity of a|n unlade|
|00000530| 6e 20 73 77 61 6c 6c 6f | 77 3f 20 22 3b 0a 09 63 |n swallo|w? ";..c|
|00000540| 69 6e 20 3e 3e 20 61 6e | 73 77 65 72 3b 0a 09 6d |in >> an|swer;..m|
|00000550| 79 66 69 6c 65 20 3c 3c | 20 61 6e 73 77 65 72 20 |yfile <<| answer |
|00000560| 3c 3c 20 65 6e 64 6c 3b | 0a 7d 0a 0a 2e 2e 2e 20 |<< endl;|.}..... |
|00000570| 74 68 61 74 27 73 20 69 | 74 21 20 20 54 77 6f 20 |that's i|t! Two |
|00000580| 6e 6f 74 65 73 3a 0a 0a | 31 2e 20 57 68 65 6e 20 |notes:..|1. When |
|00000590| 79 6f 75 20 75 73 65 20 | 74 68 65 20 22 3e 3e 22 |you use |the ">>"|
|000005a0| 20 6f 70 65 72 61 74 6f | 72 20 74 6f 20 72 65 61 | operato|r to rea|
|000005b0| 64 20 61 20 63 68 61 72 | 61 63 74 65 72 20 61 72 |d a char|acter ar|
|000005c0| 72 61 79 2c 20 69 74 20 | 6f 6e 6c 79 20 0a 72 65 |ray, it |only .re|
|000005d0| 61 64 73 20 75 70 20 74 | 6f 20 74 68 65 20 66 69 |ads up t|o the fi|
|000005e0| 72 73 74 20 77 68 69 74 | 65 73 70 61 63 65 20 28 |rst whit|espace (|
|000005f0| 73 70 61 63 65 2c 20 74 | 61 62 2c 20 6f 72 20 6e |space, t|ab, or n|
|00000600| 65 77 6c 69 6e 65 29 2e | 20 20 53 6f 20 79 6f 75 |ewline).| So you|
|00000610| 20 68 61 76 65 20 0a 74 | 6f 20 67 69 76 65 20 6f | have .t|o give o|
|00000620| 6e 65 2d 77 6f 72 64 20 | 61 6e 73 77 65 72 73 2e |ne-word |answers.|
|00000630| 20 20 54 6f 20 67 65 74 | 20 61 72 6f 75 6e 64 20 | To get| around |
|00000640| 74 68 69 73 2c 20 63 68 | 61 6e 67 65 20 22 63 69 |this, ch|ange "ci|
|00000650| 6e 20 3e 3e 20 61 6e 73 | 77 65 72 22 20 74 6f 20 |n >> ans|wer" to |
|00000660| 0a 22 63 69 6e 2e 67 65 | 74 6c 69 6e 65 28 61 6e |."cin.ge|tline(an|
|00000670| 73 77 65 72 2c 38 30 29 | 22 20 77 68 65 72 65 20 |swer,80)|" where |
|00000680| 22 38 30 22 20 69 73 20 | 74 68 65 20 6c 65 6e 67 |"80" is |the leng|
|00000690| 74 68 20 6f 66 20 74 68 | 65 20 63 68 61 72 20 61 |th of th|e char a|
|000006a0| 72 72 61 79 2e 0a 0a 32 | 2e 20 49 6e 73 74 65 61 |rray...2|. Instea|
|000006b0| 64 20 6f 66 20 63 68 61 | 72 61 63 74 65 72 20 61 |d of cha|racter a|
|000006c0| 72 72 61 79 73 2c 20 79 | 6f 75 20 72 65 61 6c 6c |rrays, y|ou reall|
|000006d0| 79 20 6f 75 67 68 74 20 | 74 6f 20 75 73 65 20 61 |y ought |to use a|
|000006e0| 20 53 74 72 69 6e 67 20 | 63 6c 61 73 73 20 69 6e | String |class in|
|000006f0| 20 0a 43 2b 2b 2e 20 20 | 54 68 65 72 65 20 61 72 | .C++. |There ar|
|00000700| 65 20 61 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 68 |e a numb|er of th|
|00000710| 65 73 65 20 61 76 61 69 | 6c 61 62 6c 65 2c 20 77 |ese avai|lable, w|
|00000720| 68 69 63 68 20 61 6c 6c | 20 64 6f 20 70 72 65 74 |hich all| do pret|
|00000730| 74 79 20 6d 75 63 68 20 | 74 68 65 20 0a 73 61 6d |ty much |the .sam|
|00000740| 65 20 74 68 69 6e 67 2e | 20 20 4f 6e 20 74 68 65 |e thing.| On the|
|00000750| 20 4d 61 63 2c 20 79 6f | 75 20 6d 69 67 68 74 20 | Mac, yo|u might |
|00000760| 62 65 20 65 73 70 65 63 | 69 61 6c 6c 79 20 69 6e |be espec|ially in|
|00000770| 74 65 72 65 73 74 65 64 | 20 69 6e 20 6d 79 20 0a |terested| in my .|
|00000780| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2c 20 |implemen|tation, |
|00000790| 62 65 63 61 75 73 65 20 | 69 74 20 63 61 6e 20 62 |because |it can b|
|000007a0| 65 20 70 61 73 73 65 64 | 20 64 69 72 65 63 74 6c |e passed| directl|
|000007b0| 79 20 74 6f 20 54 6f 6f | 6c 62 6f 78 20 63 61 6c |y to Too|lbox cal|
|000007c0| 6c 73 2e 20 20 53 65 65 | 0a 3c 68 74 74 70 3a 2f |ls. See|.<http:/|
|000007d0| 2f 77 77 77 2d 6e 63 6d | 69 72 2e 75 63 73 64 2e |/www-ncm|ir.ucsd.|
|000007e0| 65 64 75 2f 7e 6a 73 74 | 72 6f 75 74 2f 63 6c 61 |edu/~jst|rout/cla|
|000007f0| 73 73 6c 69 62 2f 3e 20 | 66 6f 72 20 74 68 65 20 |sslib/> |for the |
|00000800| 63 6f 64 65 2e 0a 0a 47 | 6f 6f 64 20 6c 75 63 6b |code...G|ood luck|
|00000810| 21 20 20 41 6e 64 20 77 | 72 69 74 65 20 74 6f 20 |! And w|rite to |
|00000820| 6d 65 20 69 66 20 79 6f | 75 20 68 61 76 65 20 61 |me if yo|u have a|
|00000830| 6e 79 20 74 72 6f 75 62 | 6c 65 2e 09 0a 0a 2c 2d |ny troub|le....,-|
|00000840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000870| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000880| 2d 2e 0a 7c 20 20 20 20 | 4a 6f 73 65 70 68 20 4a |-..| |Joseph J|
|00000890| 2e 20 53 74 72 6f 75 74 | 20 20 20 20 20 20 20 20 |. Strout| |
|000008a0| 20 20 20 44 65 70 61 72 | 74 6d 65 6e 74 20 6f 66 | Depar|tment of|
|000008b0| 20 4e 65 75 72 6f 73 63 | 69 65 6e 63 65 2c 20 55 | Neurosc|ience, U|
|000008c0| 43 53 44 20 20 20 7c 0a | 7c 20 20 20 20 6a 73 74 |CSD |.|| jst|
|000008d0| 72 6f 75 74 40 75 63 73 | 64 2e 65 64 75 20 20 20 |rout@ucs|d.edu |
|000008e0| 20 20 20 20 20 20 20 20 | 68 74 74 70 3a 2f 2f 77 | |http://w|
|000008f0| 77 77 2d 61 63 73 2e 75 | 63 73 64 2e 65 64 75 2f |ww-acs.u|csd.edu/|
|00000900| 7e 6a 73 74 72 6f 75 74 | 2f 20 20 7c 0a 60 2d 2d |~jstrout|/ |.`--|
|00000910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000920| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000930| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000940| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000950| 27 0a 0a 0a | |'... | |
+--------+-------------------------+-------------------------+--------+--------+